<?php

namespace common\sms;

trait SenderTrait
{
    public $errMsg = '';

    public function checkTemplate($template)
    {
        return true;
    }

    public function getErrorMsg()
    {
        return $this->errMsg;
    }

    public function setErrorMsg($errMsg)
    {
        $this->errMsg = $errMsg;
    }

    public function hasKeys($arr, $keys)
    {
        foreach ($keys as $k) {
            if (!isset($arr[$k])) {
                return false;
            }
        }
        return true;
    }
}
